/*在MyString类的基础上完成一下功能:
重载运算符：+、+=、=、[]、>、<、>=、<=、== */
#ifndef MYSTRING_H_
#define MYSTRING_H_

class MyString{
private:
	char* m_data;
public:
	//无参构造
	MyString();
	//带参构造
	MyString(const char* _str);
	//拷贝构造
	MyString(const MyString& rhs);
	const char* data() const { return this->m_data; }
	~MyString();
	//len
	int getLen()const;
	//+
	MyString operator+(const MyString a)const;
	//=
	int operator = (const MyString a);
	//+=
	int operator += (const MyString a);
	//[]
	char& operator[](int n) const;
	//==
	int operator ==(const MyString a)const;
	//>
	int operator >(const MyString a)const;
	//<
	int operator <(const MyString a)const;
	//>=
	int operator >=(const MyString a)const;
	//<=
	int operator <=(const MyString a)const;
};


#endif
